﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebSimplicity.Data.Helpers;

namespace WebSimplicity.Data
{
    public class WebSimplicityActionFilter: ActionFilterAttribute
    {
        public override void OnResultExecuting(ResultExecutingContext filterContext)
        {
            base.OnResultExecuting(filterContext);
            Website web = new Website().Current();
            Applications.SetActive(ShortGuid.Encode((Guid)web.ApplicationId));
        }
    }
}